package com.kuangstudy.exception;

/**
 * ClassName: Demo2
 * date: 2021/07/16 23:30:09
 *
 * @author zlk
 */
public class Demo2 {
    public static void main(String[] args) throws MyException {
        test(12);
    }
    static void test(int a) throws MyException {
        if (a>10){
            throw new MyException(a);//Exception in thread "main" MyException{detail=12}
        }
    }
}
